package com.jk.dmpayprovider.djhcontroller;

import com.jk.dmcommon.djhEntity.DjhDistrEntity;
import com.jk.dmcommon.djhEntity.DjhWatchPersonEntity;
import com.jk.dmpayprovider.djhservice.DjhOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("djhOrderProvider")
public class DjhOrderController {
    @Autowired
    private DjhOrderService djhOrderService;

    @RequestMapping(value = "addPerson",method = RequestMethod.POST)
    public void addPerson(@RequestBody DjhWatchPersonEntity djhWatchPersonEntity){
            djhOrderService.addPerson(djhWatchPersonEntity);
    }

    @RequestMapping("selectPeisong")
    public List<DjhDistrEntity> selectPeisong(Integer goodsId){
        return djhOrderService.selectPeisong(goodsId);
    }
    //观影人回显
    @RequestMapping("selectAllWatchPerson")
    public List<DjhWatchPersonEntity> selectAllWatchPerson(){
        return djhOrderService.selectAllWatchPerson();
    }
}
